package com.dd.ent.car.common.player;

import android.graphics.SurfaceTexture;

import java.util.concurrent.atomic.AtomicReference;

/**
 * Author:LiuJianSheng
 * Date:2016/7/27
 */
public class SetSurfaceMessage extends PlayerMessage {
    private SurfaceTexture mSurfaceTexture;

    public SetSurfaceMessage(MediaPlayerWrapper mediaPlayer, AtomicReference<PlayerMessageState> messageState, SurfaceTexture surfaceTexture) {
        super(mediaPlayer);
        this.mSurfaceTexture = surfaceTexture;
    }

    @Override
    public void runMessage() {
        getMediaPlayer().setSurface(mSurfaceTexture);
    }
}
